package com.moorror.cola.strategy.plugin.utils;

import com.intellij.openapi.application.Application;
import com.intellij.openapi.components.ComponentManager;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.project.Project;
import org.jetbrains.annotations.NotNull;

/**
 * @Author jiyanghuang
 * @Date 2022/3/17 1:24 AM
 */
public class ProjectServiceUtils {

    /**
     * getInstance
     *
     * @param project project
     * @return obj 利用了内部管理对象生成服务
     */
    public static <T> T instance(@NotNull Project project, Class<T> tClass) {
        return project.getService(tClass);
    }
}
